<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="ColorProxy,net.edecker.tween.proxy.ColorProxy,color,colorTransform,progress,newEndColor" name="keywords">
<title>net.edecker.tween.proxy.ColorProxy</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'ColorProxy - NanoTween';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">NanoTween</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?net/edecker/tween/proxy/ColorProxy.html&amp;net/edecker/tween/proxy/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;ColorProxy</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class ColorProxy"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">net.edecker.tween.proxy</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class ColorProxy</td>
</tr>
</table>
<p></p>
  Allows for a color value to be interpolated and tweened.
  Can also optionally update a target's specified parameter.
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#color">color</a> : uint<div class="summaryTableDescription">[read-only] The current color interpolated by the progress attribute.</div>
</td><td class="summaryTableOwnerCol">ColorProxy</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#colorTransform">colorTransform</a> : ColorTransform<div class="summaryTableDescription">[read-only] Get the current color as a ColorTransform object 
   </div>
</td><td class="summaryTableOwnerCol">ColorProxy</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#progress">progress</a> : Number<div class="summaryTableDescription"> The progress though the interpolation of the start color and end color.</div>
</td><td class="summaryTableOwnerCol">ColorProxy</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#ColorProxy()">ColorProxy</a>(startColor:uint, endColor:uint, target:Object = null, propertyName:String = null)</div>
<div class="summaryTableDescription"> Creates a new ColorProxy object.</div>
</td><td class="summaryTableOwnerCol">ColorProxy</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#newEndColor()">newEndColor</a>(endColor:uint):void</div>
<div class="summaryTableDescription"> Reset the target destination color.</div>
</td><td class="summaryTableOwnerCol">ColorProxy</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="color"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">color</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>color:uint</code>&nbsp;&nbsp;[read-only]<p> The current color interpolated by the progress attribute.</p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get color():uint</code>
<br>
</div>
<a name="colorTransform"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">colorTransform</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>colorTransform:ColorTransform</code>&nbsp;&nbsp;[read-only]<p> Get the current color as a ColorTransform object 
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get colorTransform():ColorTransform</code>
<br>
</div>
<a name="progress"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">progress</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>progress:Number</code>&nbsp;&nbsp;[read-write]<p> The progress though the interpolation of the start color and end color.
    0 would be the start color at 100%, and 1 would be the end color at 100%.
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get progress():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set progress(value:Number):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="ColorProxy()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">ColorProxy</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function ColorProxy(startColor:uint, endColor:uint, target:Object = null, propertyName:String = null)</code><p> Creates a new ColorProxy object.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">startColor</span>:uint</code> &mdash; The starting color (at 0% progress)
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">endColor</span>:uint</code> &mdash; The targeted end color (at 100% progress)
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">target</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; Optional target that will be updated during the tween.
   When using a target the propertyName parameter must be set.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">propertyName</span>:String</code> (default = <code>null</code>)<code></code> &mdash; The name of the public property on the target object to update.
   
   </td>
</tr>
</table>
<br>
<span class="label">Example</span>
<br>Consider the following code in a class for MyCircle:
    <div class='listing'><pre>
    
    private var _color:uint;
    private var _radius:Number;
    
    public function MyCircle(color:uint, radius:Number) {
      _color = color;
      _radius = radius;
      draw();
    }
    
    public function set color(value:uint):void {
      _color = value;
      draw();
    }
    
    public function get color():uint {
      return _color;
    }
     
    public function draw():void {
      this.graphics.clear();
      this.graphics.beginFill(_color);
      this.graphics.drawCircle(0,0,_radius);
      this.graphics.endFill();
    }</pre></div>
    
     <p></p>The ColorProxy object could be be used the following way with the above class to have a circle change from red to blue:
     <div class='listing'><pre>
     
    var myCircle:MyCircle = new MyCirclr(0xFF0000,20);
    var myProxy:ColorProxy = new ColorProxy(0xFF0000,0x0000FF,myCircle,"color");
    new NanoTween(myProxy, 1.0, {progress:1}).start();</pre></div>
   <p></p>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="newEndColor()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">newEndColor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function newEndColor(endColor:uint):void</code><p> Reset the target destination color. The current color value will be set to the start color.
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">endColor</span>:uint</code> &mdash; The new end color.
   </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
